package com.jade.modules.workflow;

import com.jade.framework.base.context.ApplicationContextUtils;

/**
 * 抽象的流程函数。
 */
public abstract class AbstractFlowFunction
        implements FlowFunction
{
    private FlowService service;

    protected FlowService getService()
    {
        if (service == null) {
            service = ApplicationContextUtils.getBean("module_workflowService");
        }
        return service;
    }

    public abstract void execute(FlowContext context, String operatorType, String operator, int result, String remark)
            throws FlowException;

}
